#pragma once

#include "scr_basic_sprite.h"
#include "scr_math.h"

class SCRProjectile
	: public SCRBasicSprite
{
public:

	SCRProjectile(const FX32& X, const FX32& Y, const FX32& Heading,
		const FX32& Speed, const int& Lifetime, const int& Damage,
		const SCRTexturePtr Texture);
	virtual ~SCRProjectile();
	void Update(const int& Delta);
	void Render(const int& Delta);
	bool IsActive() const;

protected:

	FX32 m_FixedX;
	FX32 m_FixedY;
	FX32 m_DirectionX;
	FX32 m_DirectionY;
	int m_Lifetime;
	int m_Damage;
	int m_Active;
};

inline bool SCRProjectile::IsActive() const
{
	return m_Active != 0;
}
